#version 430

layout(location = 0)in vec3 gridsPos;

out vec4 color;

uniform mat4 mvMatrix;
uniform mat4 projMatrix;

void main()
{
    gl_Position = projMatrix*mvMatrix*vec4(gridsPos,1.0f);

    vec4 c;

    if(gl_VertexID%40==0||gl_VertexID%40==1)
    {
        c = vec4(0.0f,1.0f,0.0f,0.3f);
    }
    else if(gl_VertexID%40==2||gl_VertexID%40==3)
    {
        c = vec4(1.0f,0.0f,0.0f,0.3f);
    }
    else
    {
        c = vec4(1.0f,1.0f,1.0f,0.2f);
    }
    color = c;
}
